#ifndef propertytree_H
#define propertytree_H
//------------------------
#include "recordlist.h"
#include "expenserecordlist.h"
#include "incomerecordlist.h"
#include "alertlist.h"
#include <QDateTime>
#include <QDebug>
//------------------------

#ifndef Q_MOC_RUN
#include<boost/property_tree/xml_parser.hpp>
#include<boost/property_tree/ptree.hpp>//define ptree
#include<boost/foreach.hpp>//move loop body into a predicate]
#endif // Q_MOC_RUN
#include<string>
#include<vector>
#include<iostream>
#include<fstream>
#include<sstream>
#include<ostream>
#include<istream>

using boost::property_tree::ptree;//use Boost PropertyTree
using boost::property_tree::xml_parser::trim_whitespace;
using namespace std;

class PropertyTree
{
private:
	ptree pt;
	string version;
    static int version_num;
public:
    PropertyTree();
    void loadXML2List(ExpenseRecordList&, IncomeRecordList&, AlertList&, string&); //load current XML data to recordlist
    void saveList2XML(ExpenseRecordList&, IncomeRecordList&, AlertList&, string&);//save current recordList to XML

	void print(void);
};

#endif // !propertytree_H
